package com.goldcn.user.dao;

import com.goldcn.user.dto.*;
import com.goldcn.user.model.CompanyInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface CompanyInfoMapper {
    int deleteByPrimaryKey(Long companyInfoID);

    int insert(CompanyInfo record);

    int insertSelective(CompanyInfo record);

    CompanyInfo selectByPrimaryKey(Long companyInfoID);

    int updateByPrimaryKeySelective(CompanyInfo record);

    int updateByPrimaryKeyWithBLOBs(CompanyInfo record);

    int updateByPrimaryKey(CompanyInfo record);

    CompanyInfo selectBycompanyName(@Param(value = "companyName") String companyName, @Param(value = "companyID") Long companyID);

    CompanyInfo selectBycompanyContactPhone(@Param(value = "contactPhone") String contactPhone, @Param(value = "companyID") Long companyID);

    List<CompanyInfo> selectListByCondition(CompanySelectDto companySelectDto);

    List<Map<String,Object>> selectPullList(CompanySelectDto companySelectDto);

    List<CompanyInfoDto> selectPurchaseListByCondition(CompanySelectPurchaseDto companySelectDto);

    int updateIsAudit(StateDto stateDto);

    int updateCompanyState(StateDto stateDto);

    int updateIsGold(StateDto stateDto);

    int updateSettleType(SettleTypeDto settleTypeDto);

    CompanyInfo selectByUserID(Long userID);

    int selectCompanyQtyByIsAudit(@Param("isAudit") Integer isAudit, @Param(value = "companyID") Long companyID);

    List<CompanyInfo> selectAllCompany(@Param(value = "companyID") Long companyID);

    List<Map<String, Object>> getHasSettleType(@Param(value = "companyID") Long companyID);

    int deleteByUserId(Long userID);

    Long countByGroupID(@Param("groupID") Long groupID);

    List<CompanyInfoDto> selectShopListByCondition(CompanySelectPurchaseDto companySelectDto);

    CompanyInfo getMallInfo(@Param(value = "companyID") Long companyID);

}